import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    Custmer: {
      username: "",
      phone: "",
      address: "",
    },
  },
  mutations: {
    getUdata(state, data) {
      state.Custmer.username = data.username;
      state.Custmer.phone = data.phone;
      state.Custmer.address = data.address;
    },
  },
  getters:{
    getUserInfo:(state)=>{
      return {
        username:state.username,
        phone:state.phone,
        address:state.address
      }
    }
  }
});
